package com.cloudkinto.bo.api;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
public class ProductApiQueryBo {
    @ApiModelProperty(value = "当前页")
    public Integer current = 1;

    @ApiModelProperty(value = "每页条数 默认20 最大200")
    public Integer pageSize = 20;
    private String sku;
    private List<String> skuList;
    private String janCode;
    private List<String> janCodeList;
    private String spu;
    private String fnSku;

    public Integer getPageSize() {
        if (pageSize > 200) {
            return 200;
        }
        if (pageSize < 1) {
            return 10;
        }
        return pageSize;
    }
}
